using DEL.Gzh;
using IBLL.Gzh;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;

namespace Web.Controllers
{
    public class SQJDController : Controller
    {
        ISQJDService _ss = BLLFactory.SetSQJDService();
        public IActionResult Index()
        {
            return View();
        }

        public IActionResult SearchInjuryResult(SQJD item)
        {
            try
            {
                var _injury = _ss.GetEntitysByLambda(o => o.InjureName == item.InjureName && o.IDNumber == item.IDNumber).ToList().SingleOrDefault();

                return Json(new { Result = "Success", row = _injury });

            }
            catch (Exception ex)
            {
                return Json(new { Result = "Faild" + ex.Message });
            }
        }
    }
}